package net.hn.hnms.biz.analysis.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.hn.hnms.biz.analysis.domain.dto.EquipValueDto;
import net.hn.hnms.biz.analysis.domain.dto.EquipmentStartDetailsDay;
import net.hn.hnms.biz.analysis.domain.dto.MajorEquipmentStartDay;
import net.hn.hnms.biz.analysis.mapper.ProductionMapper;
import net.hn.hnms.biz.analysis.service.IProductionService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
@DS("production")
@RequiredArgsConstructor
public class ProductionServiceImpl implements IProductionService {

    private final ProductionMapper productionMapper;

    @Override
    public Float getDayAvgFlow(List<String> sensorList, String begin15Time, String endTime,String mineCode) {
        return productionMapper.getDayAvgFlow(sensorList, begin15Time, endTime,mineCode);
    }

    @Override
    public List<EquipValueDto> getStartupRateData(String tableName, String bTime, String eTime, String pointCode, String code) {
        return productionMapper.getStartupRateData(tableName, bTime, eTime, pointCode, code);
    }

    @Override
    public List<EquipValueDto> getStartupRateOtherData(String tableName, String bTime, String eTime, String pointCode, String code){
        return productionMapper.getStartupRateOtherData(tableName, bTime, eTime, pointCode, code);
    }

    @Override
    public void batchInsertSensorValue(List<MajorEquipmentStartDay> dataList) {
        productionMapper.batchInsertSensorValue(dataList);
    }

    @Override
    public void batchInsertDiffSensorValue(List<EquipmentStartDetailsDay> list) {
        productionMapper.batchInsertDiffSensorValue(list);
    }


}
